User interfaces are often customized based on user preferences, interests, browse history and other factors. Placement of content and/or user interface elements is often dictated by a standardized look and feel or a site-wide set of style guidelines. Placement of content items can be customized based upon other aspects that can be detected about users but often fails to take into account where in a user interface and/or viewport that a user's attention might be focused. Accordingly, placement of content items within a user interface can be optimized if a location of the user's attention within a viewport can be detected.